﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_maintain.TMS_Maintenancerecord
{
    public class TMS_MaiAppService : ApplicationService
    {
        private readonly ITMS_Maintenancerecords _ITMS_repairs;
        public TMS_MaiAppService(ITMS_Maintenancerecords ITMS_repairs)
        {
            _ITMS_repairs = ITMS_repairs;
        }

        public async Task<PageResponse<TMS_MaintenancerecordDto>> GetMai(string MaiPeop, string MaiNumber, int pageindex = 1, int pagesize = 5)
        {
            return await _ITMS_repairs.GetMai(MaiPeop, MaiNumber, pageindex, pagesize);
        }

        public async Task<int> MaiAdds(TMS_MaintenancerecordDto info)
        { 
            return await _ITMS_repairs.MaiAdds(info);
        }

        public async Task<int> DeletMai(string Id)
        { 
            return await _ITMS_repairs.DeletMai(Id);
        }

        public async Task<int> UpdateMaiup(TMS_MaintenancerecordDto tMS_Induction)
        {
            return await _ITMS_repairs.UpdateMaiup(tMS_Induction);
        }
    }
}
